#pragma once
#include <Rz/IObject.h>
#include "IBindableResource.h"
#include "IVertexBuffer.h"
#include "IIndexBuffer.h"
#include "IDeviceResource.h"

namespace Rz { namespace Graphics { namespace Render {

class IVertexArray :
	virtual public IObject,
	virtual public IDeviceResource,
	virtual public IBindableResource
{
	public:
		RZ_RTTI_INTERFACE(Rz::Graphics::Render, IVertexArray);
		RZ_RTTI_IMPLEMENTS(IObject, IDeviceResource, IBindableResource);
		RZ_RTTI_END;

		virtual const IVertexBuffer* GetVertexBuffer() const { return _vertexBuffer; }
		virtual IVertexBuffer* GetVertexBuffer() { return _vertexBuffer; }
		virtual void SetVertexBuffer(IVertexBuffer* vertexBuffer) { _vertexBuffer = vertexBuffer; }

		virtual const IIndexBuffer* GetIndexBuffer() const { return _indexBuffer; }
		virtual IIndexBuffer* GetIndexBuffer() { return _indexBuffer; }
		virtual void SetIndexBuffer(IIndexBuffer* indexBuffer) { _indexBuffer = indexBuffer; }

	// TODO: private
	protected:
		Ptr<IVertexBuffer> _vertexBuffer;
		Ptr<IIndexBuffer> _indexBuffer;
};

} } }
